setAccessibilityLiveRegion
Deprecated
Call setAccessibilityLiveRegion directly.
Sets the live region mode for this view. This indicates to accessibility services whether they should automatically notify the user about changes to the view's content description or text, or to the content descriptions or text of the view's children (where applicable).
To indicate that the user should be notified of changes, use ACCESSIBILITY_LIVE_REGION_POLITE. Announcements from this region are queued and do not disrupt ongoing speech.
For example, selecting an option in a dropdown menu may update a panel below with the updated content. This panel may be marked as a live region with ACCESSIBILITY_LIVE_REGION_POLITE to notify users of the change.
For notifying users about errors, such as in a login screen with text that displays an "incorrect password" notification, that view should send an AccessibilityEvent of type CONTENT_CHANGE_TYPE_ERROR and set setError instead. Custom widgets should expose error-setting methods that support accessibility automatically. For example, instead of explicitly sending this event when using a TextView, use setError.
To disable change notifications for this view, use ACCESSIBILITY_LIVE_REGION_NONE. This is the default live region mode for most views.
If the view's changes should interrupt ongoing speech and notify the user immediately, use ACCESSIBILITY_LIVE_REGION_ASSERTIVE. This may result in disruptive announcements from an accessibility service, so it should generally be used only to convey information that is time-sensitive or critical for use of the application. Examples may include an incoming call or an emergency alert.
Parameters
The view on which to set the live region mode
The live region mode for this view, one of: